<div class="wrap">

{if $smarty.cookies.message == null}
	<div id="ajaxResponse1" class="ajaxResponse"></div>
{else}
	<div id="ajaxResponse1" class="ajaxResponse fade" style="display:block">{$smarty.cookies.message}</div>
{/if}
<h2>{TranslateTag}B_LABEL_EDIT_INCOMING_ORDER{/TranslateTag}</h2>
<form name="editincomingorder" id="editincomingorder" method="post">
	<input type="hidden" name="act" value="editincomingorder" />
    <input type="hidden" name="so_id" value="{$INCOMING_ORDER->so_id}" />
	<table class="editform" width="100%" cellspacing="2" cellpadding="5">
		<tr>
			<th width="33%" scope="row" valign="top">
			<label for="so_product_id">{TranslateTag}B_LABEL_NAME{/TranslateTag}:</label></th>
			<td width="67%">
			{$INCOMING_ORDER->customer_firstname} {$INCOMING_ORDER->customer_lastname}</td>
		</tr>
		<tr>
			<th width="33%" scope="row" valign="top">
			<label for="product_name">Email:</label></th>
			<td width="67%">
			{$INCOMING_ORDER->customer_email}</td>
		</tr>
		<tr>
			<th width="33%" scope="row" valign="top">
			<label for="telephone">{TranslateTag}B_LABEL_TELEPHONE{/TranslateTag}:</label></th>
			<td width="67%">
			{$INCOMING_ORDER->delivery_telephone}</td>
		</tr>
		<tr>
			<th width="33%" scope="row" valign="top">
			<label for="product_price">{TranslateTag}B_LABEL_PAYMENT_METHOD{/TranslateTag}:</label></th>
			<td width="67%">
			{$INCOMING_ORDER->payment_method}</td>
		</tr>
		<tr>
			<th width="33%" scope="row" valign="top">
			<label for="product_tax">{TranslateTag}B_LABEL_PRODUCTS{/TranslateTag}</label></th>
			<td width="67%" valign="top">
				<table width="100%" cellpadding="0" cellspacing="0">
                            {foreach name=search from=$INCOMING_ORDER->product item=product}
                            <tr>
                                <td width="10%" align="right">{$product->product_quantity} </td>
                                <td width="10%" >&nbsp;x&nbsp;</td>
                                <td align="left">{smarty_eval code=$product->product_name}</td>
                            </tr>    
                            {/foreach}
                        </table>
            </td>
		</tr>
        <tr>
			<th width="33%" scope="row" valign="top">
			<label for="product_price">{TranslateTag}B_LABEL_DELIVERY_COST{/TranslateTag}:</label></th>
			<td width="67%">
			{$INCOMING_ORDER->delivery_cost} {$INCOMING_ORDER->symbol_left}</td>
		</tr>
        <tr>
			<th width="33%" scope="row" valign="top">
			<label for="product_price">Total:</label></th>
			<td width="67%">
			{$INCOMING_ORDER->currency_value} {$INCOMING_ORDER->symbol_left}</td>
		</tr>

	</table>
    <fieldset>
            	<legend>{TranslateTag}LABEL_BILLING_ADDRESS{/TranslateTag}</legend>
                <div id="form_register">
                	<div class="row">
                    	<div class="txt_register">{TranslateTag}B_LABEL_FIRSTNAME{/TranslateTag}:</div>
						<div class="row">
                    		<input type="text" name="billing_firstname" size="30" value="{$INCOMING_ORDER->billing_firstname}" />
                   		</div>
                	</div>
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}B_LABEL_LASTNAME{/TranslateTag}:</div>
						<div class="row">
                    		<input type="text" name="billing_lastname" size="30" value="{$INCOMING_ORDER->billing_lastname}" />
                   		</div>
                	</div>
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_STREET{/TranslateTag}:</div>
						<div class="row">
                    		<input type="text" class="textInput" style="float:left" name="billing_street_address" id="billing_street_address" value="{$INCOMING_ORDER->billing_street_address}" size="30" maxlength="60" required /><font color="#FF0000">*</font>
                   		</div>
                	</div>
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_POSTCODE{/TranslateTag}:</div>
						<div class="row">
                    		<input type="text" name="billing_postcode" size="30" style="float:left" id="billing_postcode" value="{$INCOMING_ORDER->billing_postcode}" mask="numeric" minLength="4" maxlength="10" required /><font color="#FF0000">*</font>
                   		</div>
                	</div>
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_CITY{/TranslateTag}:</div>
						<div class="row">
                    		<input type="text" class="textInput" style="float:left" name="billing_city" id="billing_city" value="{$INCOMING_ORDER->billing_city}" size="30" maxlength="60" required /><font color="#FF0000">*</font>
                   		</div>
                	</div>
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_STATE{/TranslateTag}:</div>
						<div class="row">
                    		<input type="text" class="textInput" style="float:left" name="billing_state" id="billing_state" value="{$INCOMING_ORDER->billing_state}" size="30" maxlength="60" required /><font color="#FF0000">*</font>
                   		</div>
                	</div>
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_COUNTRY{/TranslateTag}:</div>
						<div class="row">
                    		<select style="float:left" name='billing_country_id' id='billing_country_id' class='postform' required>
                                <option value=''>{TranslateTag}LABEL_PLEASE_CHOOSE{/TranslateTag}</option>
                                {foreach name=country from=$ALLCOUNTRY item=item}
                                    	<option {if $INCOMING_ORDER->billing_country eq $item->country_id}selected{/if} id='{$item->country_id}' value='{$item->country_id}'>
                                    {$item->country_name}
                                    </option>
                                {/foreach}
                            </select><font color="#FF0000">*</font>
                   		</div>
                	</div>
                </div>
			</fieldset>
            <br />
            <fieldset>
            	<legend>{TranslateTag}LABEL_DELIVERY_ADDRESS{/TranslateTag}</legend>
                <div id="form_register">
                	<div class="row">
                    	<div class="txt_register">{TranslateTag}B_LABEL_FIRSTNAME{/TranslateTag}:</div>
						<div class="row">
                    		<input type="text" name="delivery_firstname" size="30" value="{$INCOMING_ORDER->delivery_firstname}" />
                   		</div>
                	</div>
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}B_LABEL_LASTNAME{/TranslateTag}:</div>
						<div class="row">
                    		<input type="text" name="delivery_lastname" size="30" value="{$INCOMING_ORDER->delivery_lastname}" />
                   		</div>
                	</div>
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_POSTCODE{/TranslateTag}:</div>
						<div class="row">
                    		<input type="text" name="delivery_postcode" size="30" style="float:left" id="delivery_postcode" value="{$INCOMING_ORDER->delivery_postcode}" mask="numeric" minLength="4" maxlength="10" required /><font color="#FF0000">*</font>
                   		</div>
                	</div>
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_CITY{/TranslateTag}:</div>
						<div id="_delivery_city" class="row">
                    		<input type="text" class="textInput" style="float:left" name="delivery_city" id="delivery_city" value="{$INCOMING_ORDER->delivery_city}" size="30" maxlength="60" required /><font color="#FF0000">*</font>
                   		</div>
                	</div>
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_STATE{/TranslateTag}:</div>
						<div id="_delivery_state" class="row">
                    		<input type="text" class="textInput" style="float:left" name="delivery_state" id="delivery_state" value="{$INCOMING_ORDER->delivery_state}" size="30" maxlength="60" required /><font color="#FF0000">*</font>
                   		</div>
                	</div>
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_COUNTRY{/TranslateTag}:</div>
						<div id="_delivery_country_id" class="row">
                    		<select style="float:left" name='delivery_country_id' id='delivery_country_id' class='postform' required>
                                <option value=''>{TranslateTag}LABEL_PLEASE_CHOOSE{/TranslateTag}</option>
                                {foreach name=country from=$ALLCOUNTRY item=item}
                                    	<option {if $INCOMING_ORDER->delivery_country eq $item->country_id}selected{/if} id='{$item->country_id}' value='{$item->country_id}'>
                                    {$item->country_name}
                                    </option>
                                {/foreach}
                            </select><font color="#FF0000">*</font>
                   		</div>
                	</div>
                </div>
			</fieldset>
    <div class="clear"></div>
	<p class="submit" align = "right">
		<input type="image" name="submit" src="../view/admin/images/object_save.png" value="" />
	</p>
</form>

</div>  